﻿using System;

namespace Oxage.Converters
{
	/// <summary>
	/// Implements file importer and exporter.
	/// </summary>
	public interface IFileConverter
	{
		/// <summary>
		/// When implemented gets a friendly converter or file format name.
		/// </summary>
		string Name { get; }

		/// <summary>
		/// When implemented gets a default file extension for the format.
		/// </summary>
		string Extension { get; }

		/// <summary>
		/// When implemented gets a value indicating whether importing is supported.
		/// </summary>
		bool CanImport { get; }

		/// <summary>
		/// When implemented gets a value indicating whether exporting is supported
		/// </summary>
		bool CanExport { get; }

		/// <summary>
		/// When implemented imports content from a file.
		/// </summary>
		/// <param name="path"></param>
		/// <returns></returns>
		string Import(string path);

		/// <summary>
		/// When implemented exports content to a file.
		/// </summary>
		/// <param name="path"></param>
		/// <param name="content"></param>
		void Export(string path, string content);
	}
}
